# $Id$
# Maintainer: Andreas Radke <andyrtr@archlinux.org>
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Alexander Baldeck <alexander@archlinux.org>

pkgname=libxcursor
pkgver=1.1.14
pkgrel=2
pkgdesc="X cursor management library"
arch=(i686 x86_64)
url="https://xorg.freedesktop.org/"
license=('custom')
depends=('libxfixes' 'libxrender')
optdepends=('gnome-themes-standard: fallback icon theme')
makedepends=('xorg-util-macros')
backup=(usr/share/icons/default/index.theme)
source=(${url}/releases/individual/lib/libXcursor-${pkgver}.tar.bz2
        index.theme)
sha256sums=('9bc6acb21ca14da51bda5bc912c8955bc6e5e433f0ab00c5e8bef842596c33df'
            '9e2707bc3466b848a70687ae34b505930b9c260a49b3d2f014145e70c4cddcd6')

build() {
  cd "${srcdir}/libXcursor-${pkgver}"
  ./configure --prefix=/usr --sysconfdir=/etc --disable-static
  make
}

package() {
  cd "${srcdir}/libXcursor-${pkgver}"
  make DESTDIR="${pkgdir}" install

  install -m755 -d "${pkgdir}/usr/share/icons/default"
  install -m644 "$srcdir"/index.theme "${pkgdir}/usr/share/icons/default/"

  install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
  install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/"
}
